<?php
declare (strict_types = 1);
namespace app\common;

class JsonException extends \RuntimeException
{
    protected $json;

    public function __construct(int $code = 1, string $msg = null, $data = null)
    {
        $this->json = [
            'code' => $code,
            'msg' => $msg,
            'data' => $data,
        ];
    }

    public function getJson()
    {
        return $this->json;
    }
}
